﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation = "false" CodeFile="Emp3.aspx.cs" Inherits="Manage_Emp3_Emp3" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>内部员工课程管理</title>
  <link rel="stylesheet" type="text/css" href="../skin/css/base.css" />
  <script language="javascript" type="text/javascript">
      function selectall() {
          if (document.getElementById("chkSelect").checked == true) {
              v = true;
          }
          else {
              v = false;
          }
          var f = document.forms[0];
          for (i = 0; i < f.elements.length; i++)
              f.elements[i].checked = v;
      }      
</script>
<style type="text/css">
    .cinputedit
    {
    	 border:solid 1px green;
    }
    .cinput
    {
    	border:none;
    }
</style>
</head>
<body leftmargin="8" topmargin="8" background='../skin/images/allbg.gif'>
    <form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager1" runat="server"  EnableScriptGlobalization="True" EnableScriptLocalization="True">
        </asp:ScriptManager>
   <!--  快速转换位置按钮  -->
    <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA" align="center">
    <tr>
     <td height="26" background="../skin/images/newlinebg3.gif">
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td align="center"><span style="font-size:14px; font-weight:bold">内部员工记录</span></td>
       <td  align="right"  style="width:60px">
        <asp:Button ID="addEmp3" runat="server" class="coolbg_add" Text="添加内部员工" 
              onclick="addEmp3_Click" />
     </td>
     </tr>
    </table>
    </td>
    </tr>
    </table>
     <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
    <!--  内容列表   -->
     <div  style=" text-align:center">
            <input type='hidden' name='dopost' value='' />
            <table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
              <tr bgcolor='#EEF4EA'>
                <td background='skin/images/wbg.gif' align='center'>
                  <table border='0' cellpadding='0' cellspacing='0' align='center'>
                    <tr>
					
                    <td width='70'>
                      关键字：
                    </td>
                    <td width='160'>
                        <asp:TextBox ID="txtkeyword" runat="server" Width="150px"></asp:TextBox>
                    </td>
                     
                    <td width="100px">
                <asp:ImageButton ID="ibtnsearch" runat="server" Width="45px" Height="20px" 
                            BorderStyle="None"  CssClass="np"  ImageUrl="../skin/images/frame/search.gif" 
                            onclick="ibtnsearch_Click"  />
                     
                    </td>
                   </tr>
                  </table>
                </td>
              </tr>
            </table>
            </div>
    <div id="form2">
  
    <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
    <asp:UpdatePanel ID="up2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
   <ContentTemplate>
    <tr bgcolor="#E7E7E7">
	    <td height="24"  background="../skin/images/tbg.gif">&nbsp;内部员工记录
        &nbsp;&nbsp; <asp:FileUpload ID="fuExcel" runat="server" ToolTip="选择Excel文件" Height="18px" 
                        Width="381px"  />
                    &nbsp;&nbsp;
                    <asp:Button class="coolbg" ID="btnInput"  
                        runat="server" Text="从Excel导入" onclick="btnInput_Click"   />&nbsp;&nbsp;  <asp:Button ID="btnexport" runat="server"  Enabled="false"   Text="导出Excel" onclick="btnexport_Click" />
                         <a href='<%=ConfigHelper.ExcelModelPath+"内部员工.xls" %>' target="_blank" >查看Excel模板</a></td>               
    </tr>
     </ContentTemplate>
     <Triggers><asp:PostBackTrigger ControlID="btnInput" />
     </Triggers>
   </asp:UpdatePanel>
   <tr style="background-color:#ffffff">
    <td >
          <asp:GridView ID="GridView1" runat="server" Width="100%" CellPadding="4" BorderColor="#D1DDAA"  
                            AutoGenerateColumns="False"  OnRowDeleting="GridView1_RowDeleting"
                            DataKeyNames="EmpId"  DataMember="Name" SelectedIndex="0" 
              OnRowDataBound="GridView1_RowDataBound" GridLines="Both" 
              AllowPaging="False" PageIndex="1" AllowSorting="true" 
              onsorting="GridView1_Sorting" onrowcommand="GridView1_RowCommand" 
           
              >
                            <Columns>
                                
                                 <asp:TemplateField HeaderText="所属指挥中心" SortExpression="CenterName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCenterName" runat="server" Text='<%# Eval("CenterName") %>'></asp:Label>
                                    </ItemTemplate>
                                  
                                </asp:TemplateField>
                                  <asp:TemplateField HeaderText="城市" SortExpression="CityName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCity" runat="server" Text='<%# Eval("CityName") %>'></asp:Label>
                                     </ItemTemplate> 
                                </asp:TemplateField>
                               
                                <asp:TemplateField HeaderText="部门" SortExpression="DeptName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDeptName" runat="server" Text='<%# Eval("DeptName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
							   <asp:TemplateField HeaderText="所属品牌" SortExpression="BrandName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblBrandName" runat="server" Text='<%# Eval("BrandName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
							   <asp:TemplateField HeaderText="所在店铺代码" SortExpression="StoreCode">
                                    <ItemTemplate>
                                        <asp:Label ID="lblStoreCode" runat="server" Text='<%# Eval("StoreCode") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="员工姓名" SortExpression="Name">
                                    <ItemTemplate>
                                        <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="员工号" SortExpression="Code">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCode" runat="server" Text='<%# Eval("Code") %>'></asp:Label>
                                      
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="职位" SortExpression="JobName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblJobName" runat="server" Text='<%# Eval("JobName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
							
								<asp:TemplateField HeaderText="入职时间" SortExpression="EntryDate">
                                    <ItemTemplate>
                                        <asp:Label ID="lblEntryDate" runat="server" Text='<%#Eval("EntryDate") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
									<asp:TemplateField HeaderText="离职时间" SortExpression="LeaveDate">
                                    <ItemTemplate>
                                        <asp:Label ID="lblLeaveDate" runat="server" Text='<%#Eval("LeaveDate") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                  <asp:TemplateField HeaderText="操作">
                                    <ItemTemplate>
                                       <asp:LinkButton runat="server" ID="lbtEdit" CommandArgument='<%#Eval("EmpId")%>'
                                    CommandName="Edit" Text="编辑" Visible='<%#edit==1%>' ></asp:LinkButton>&nbsp;&nbsp;
                                   <asp:LinkButton runat="server" ID="lbtDelete" CommandArgument='<%#Eval("EmpId")%>'
                                    CommandName="Delete" Text="删除" Visible='<%#delete==1%>' OnClientClick="return confirm('您确定要删除该记录吗？')"></asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                            </Columns>
                            <PagerSettings FirstPageText="" LastPageText="" NextPageText="" PreviousPageText="" />
                            <RowStyle Height="20px" BackColor="#FFFFFF"  ForeColor="#000000" />
                            <FooterStyle BackColor="#FFFFFF" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#FCFDEE" />
                            <SelectedRowStyle BackColor="#FFFFFF"  ForeColor="#000000" />
                            <PagerStyle BackColor="#FCFDEE" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#FCFDEE"  ForeColor="000000" />
                            <AlternatingRowStyle BackColor="#FCFDEE" ForeColor="#000000" />
                            
                        </asp:GridView>
   </td>
   </tr>
   
     <tr align="right" bgcolor="#EEF4EA">
                <td height="36" align="center" >
                    <webdiyer:AspNetPager ID="pager1" runat="server" OnPageChanged="pager1_PageChanged"
                        PageSize="20">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
    </table>
     
  </div>
  </ContentTemplate>
     <Triggers><asp:PostBackTrigger ControlID="btnexport" /></Triggers>
    </asp:UpdatePanel>
    </form>
</body>
</html>
